﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Castle.Windsor;

namespace ComDevFx.Arch.Base.DI
{
    public abstract class ServiceContainer
    {
        private static IWindsorContainer container = null;

        /// <summary>
        /// 构造WindsorContainer容器
        /// </summary>
        public ServiceContainer()
        {
            // 初始化容器
            container = new WindsorContainer(AppDomain.CurrentDomain.BaseDirectory + "\\Config\\Boot.config");
        }

        /// <summary>
        /// 获取WindsorContainer容器
        /// </summary>
        /// <returns></returns>
        public IWindsorContainer GetWindsorContainer()
        {
            return container;
        }
    }
}
